import org.korifey.ffalg.NumberTheory;


public class Problem7 {
	public static void main(String[] args) {
		System.out.println(solve());
	}

	public static long solve() {
		return NumberTheory.erathosphen(1000000)[10000];
	}
}
